<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the role property from the TRTCParams class, for the Dart programming language.">
  <title>role property - TRTCParams class - trtc_cloud_def library - Dart API</title>


  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  
  <link rel="stylesheet" href="../../static-assets/github.css?v1">
  <link rel="stylesheet" href="../../static-assets/styles.css?v1">
  <link rel="icon" href="../../static-assets/favicon.png?v1">

  
</head>


<body data-base-href="../../"
      data-using-base-href="false">

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../../index.html">tencent_trtc_cloud</a></li>
    <li><a href="../../trtc_cloud_def/trtc_cloud_def-library.html">trtc_cloud_def</a></li>
    <li><a href="../../trtc_cloud_def/TRTCParams-class.html">TRTCParams</a></li>
    <li class="self-crumb">role property</li>
  </ol>
  <div class="self-name">role</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>


  <div id="dartdoc-main-content" class="main-content">
      <div>
<h1><span class="kind-property">role</span> property 
    <a href="https://dart.dev/null-safety" class="feature feature-null-safety" title="Supports the null safety language feature.">Null safety</a>
</h1></div>

        <section class="multi-line-signature">
          <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a>
          <span class="name ">role</span>
          <div class="features">read / write</div>

        </section>
        
<section class="desc markdown">
  <p>【字段含义】直播场景下的角色，SDK 用这个参数确定用户是主播还是观众<code>直播场景下必填，通话场景下不填写</code>。</p>
<p>【特别说明】仅适用于直播场景（TRTC_APP_SCENE_LIVE 和 TRTC_APP_SCENE_VOICE_CHATROOM），通话场景（AUDIOCALL 和 VIDEOCALL）下指定无效。</p>
<p>【推荐取值】默认值：主播（TRTCRoleAnchor）</p>
</section>

        
<section class="summary source-code" id="source">
  <h2><span>Implementation</span></h2>
  <pre class="language-dart"><code class="language-dart">int role;

</code></pre>
</section>


  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
  <form class="search-sidebar" role="search">
    <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
  <li><a href="../../index.html">tencent_trtc_cloud</a></li>
  <li><a href="../../trtc_cloud_def/trtc_cloud_def-library.html">trtc_cloud_def</a></li>
  <li><a href="../../trtc_cloud_def/TRTCParams-class.html">TRTCParams</a></li>
  <li class="self-crumb">role property</li>
</ol>


    <h5>TRTCParams class</h5>
    <ol>

    <li class="section-title"><a href="../../trtc_cloud_def/TRTCParams-class.html#constructors">Constructors</a></li>
    <li><a href="../../trtc_cloud_def/TRTCParams/TRTCParams.html">TRTCParams</a></li>


    <li class="section-title">
      <a href="../../trtc_cloud_def/TRTCParams-class.html#instance-properties">Properties</a>
    </li>
    <li><a href="../../trtc_cloud_def/TRTCParams/businessInfo.html">businessInfo</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></li>
    <li><a href="../../trtc_cloud_def/TRTCParams/privateMapKey.html">privateMapKey</a></li>
    <li><a href="../../trtc_cloud_def/TRTCParams/role.html">role</a></li>
    <li><a href="../../trtc_cloud_def/TRTCParams/roomId.html">roomId</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>
    <li><a href="../../trtc_cloud_def/TRTCParams/sdkAppId.html">sdkAppId</a></li>
    <li><a href="../../trtc_cloud_def/TRTCParams/streamId.html">streamId</a></li>
    <li><a href="../../trtc_cloud_def/TRTCParams/strRoomId.html">strRoomId</a></li>
    <li><a href="../../trtc_cloud_def/TRTCParams/userDefineRecordId.html">userDefineRecordId</a></li>
    <li><a href="../../trtc_cloud_def/TRTCParams/userId.html">userId</a></li>
    <li><a href="../../trtc_cloud_def/TRTCParams/userSig.html">userSig</a></li>

    <li class="section-title"><a href="../../trtc_cloud_def/TRTCParams-class.html#instance-methods">Methods</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
    <li><a href="../../trtc_cloud_def/TRTCParams/toJson.html">toJson</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/toString.html">toString</a></li>

    <li class="section-title inherited"><a href="../../trtc_cloud_def/TRTCParams-class.html#operators">Operators</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></li>




</ol>

  </div><!--/.sidebar-offcanvas-->

  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    tencent_trtc_cloud
      1.2.4
  </span>

  
</footer>



<script src="../../static-assets/highlight.pack.js?v1"></script>
<script src="../../static-assets/script.js?v1"></script>



</body>

</html>

